<template>
  <div>第二个Pinia的演示页面</div>
  <div>
    {{ count }} 和 {{ doubleCount }}
    <button @click="increment">+</button>
    <button @click="router.push('/study/four')">回到第一个演示页</button>
  </div>
</template>

<script setup>
import { ref } from 'vue'
import { useCounterStore } from '@/stores/counter'
import { storeToRefs } from 'pinia'
import { useRouter } from 'vue-router'
const router = useRouter()

const { increment } = useCounterStore()

const { count, doubleCount } = storeToRefs(useCounterStore())
</script>

<style scoped></style>
